import { IEventHandler } from "../Interfaces/IUtils";

/**for虚幻数据解析 */
export default class VMForTransfer {
  /**
   * 命令函数
   * @param cmd 解析命令
   */
  constructor(cmd: string) {
    var forCmds = cmd.split("in");
    this.item = "item";
    this.data = cmd;
    if (forCmds.length > 1) {
      this.data = forCmds[1].trim();
      this.item = forCmds[0].trim();
    }
  }
  /**循环项名称 */
  item: string;
  /**操作数据 */
  data: string;
  /**监听函数 */
  watch: IEventHandler;
}
